home *** CD-ROM | disk | FTP | other *** search
/ Chip 2001 June / CHIP Haziran 2001.iso / prog / share / 17 / dings_e.exe / Compiler / Bin / OpenGLFont.h < prev    next >
C/C++ Source or Header  |  2001-03-19  |  2KB  |  54 lines

  1. ////////////////////////////////////////////////////////////////////
  2. // OpenGLFont - A OpenGL-DIGITAL-RAINBOWS EXTENSION FOR FONT SUPPORT
  3. //
  4. //////////////////////////////////////////////////////////////////////
  5.  
  6. #if !defined(AFX_OPENGLFONT_H__9506C5C2_415D_11D4_9493_83061F1FAC44__INCLUDED_)
  7. #define AFX_OPENGLFONT_H__9506C5C2_415D_11D4_9493_83061F1FAC44__INCLUDED_
  8.  
  9. #if _MSC_VER > 1000
  10. #pragma once
  11. #endif // _MSC_VER > 1000
  12.  
  13. #include <TCHAR.h>
  14.  
  15. #ifdef _WINDOWS_
  16. #include "windows.h"
  17. #else
  18. #include "afxwin.h"
  19. #endif
  20.  
  21. #include <gl\gl.h>              // OpenGL
  22. #include <gl\glu.h>             // GLU library
  23. #include "GFFileSystem.h"
  24.  
  25. class OpenGLFont  
  26. {
  27. // PUBLIC
  28. public:
  29.     void    FunPrint(LPCTSTR text, short x, short y);
  30.     void    Print(LPCTSTR text, short x, short y); // Print a String / Int / Float
  31.     void    Print(int fig,      short x, short y);
  32.     void    Print(float fig,    short x, short y);
  33.     void    ColorPrint(LPCTSTR text, short x, short y, COLORREF col, float alpha); // Print colored Text
  34.     void    ColorPrint(float fig, short x, short y, COLORREF col, float alpha);
  35.     void    ColorPrint(int fig, short x, short y, COLORREF col, float alpha);
  36.     void    SetScreenWidth(GLshort s)                {this->ScreenX=s;} // Set Screen X Size for linebreak
  37.     bool    Init(LPCTSTR szFileName, int screenx=800); // Create & Load Font
  38.     OpenGLFont();
  39.     virtual ~OpenGLFont(); // Destruct
  40.  
  41. // PRIVATE
  42. protected:
  43.     bool    LoadBMPTexture(LPCTSTR szFileName, COLORREF colorkey); // Intern
  44.  
  45.     GLshort                    SizeX;
  46.     GLshort                    SizeY;
  47.     GLshort                    ScreenX;
  48.     GLuint                    Texture[128];
  49. };
  50.  
  51. #endif // !defined(AFX_OPENGLFONT_H__9506C5C2_415D_11D4_9493_83061F1FAC44__INCLUDED_)
  52.  
  53.  
  54.